<?php

namespace App\Company\Controllers;

use App\Admin\Repositories\Company;
use App\Models\CompanyModel;
use App\Services\Tenancy\Tenancy;
use Dcat\Admin\Form;
use Dcat\Admin\Http\Controllers\AdminController;
use Dcat\Admin\Layout\Content;
use Dcat\Admin\Show;
use Dcat\Admin\Traits\HasUploadedFile;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Storage;

class MerchantChatController extends AdminController
{
    use HasUploadedFile;


    public function index(Content $content){
       
        $company = DB::table("company")->where("id",auth('company')->id())->first();
        // 设置内容类型为HTML
        
        $uuname = $company->uuname;
       // $uuname = "shop_uuid_10";
        header('Content-Type: text/html');
        // 输出HTML代码，包括JavaScript来打开新窗口
        return '<script type="text/javascript">window.open(\'https://pxhx.charityzimi.cn?from='.$uuname.'\', \'_blank\');</script>';
    }
   
 

}
